//
//  PublicBorrowMoneyView.m
//  WBBaseProject
//
//  Created by 吴斌 on 2018/3/7.
//  Copyright © 2018年 吴斌. All rights reserved.
//

#import "PublicBorrowMoneyView.h"
#import "LiuXSlider.h"
#import "PublicBorrowInputView.h"
#import "PublicBorrowStagesView.h"
@implementation PublicBorrowMoneyView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self setupUI];
    }
    return self;
}

- (void)setupUI
{
    self.backgroundColor = [UIColor whiteColor];
    
    PublicBorrowInputView *moneyInputView = [[NSBundle mainBundle] loadNibNamed:@"PublicBorrowInputView" owner:nil options:nil].firstObject;
    moneyInputView.frame = CGRectMake(0, 20, kScreenWidth, 40);
    [self addSubview:moneyInputView];
    
    //借款金额
    LiuXSlider *slider=[[LiuXSlider alloc] initWithFrame:CGRectMake(20, 85, kScreenWidth - 40, 50) titles:@[@"1000元",@"2000元",@"3000元",@"4000元",@"5000元",@"6000元"] firstAndLastTitles:@[@"1000",@"8000"] defaultIndex:0 sliderImage:[UIImage imageNamed:@"日历"]];
    [self addSubview:slider];
    slider.block=^(int index){
        NSLog(@"当前index==%d",index);
    };
    
    PublicBorrowStagesView *stageView = [[NSBundle mainBundle] loadNibNamed:@"PublicBorrowStagesView" owner:nil options:nil].firstObject;
    stageView.frame = CGRectMake(0, 155, kScreenWidth, 40);
    [self addSubview:stageView];

}

@end
